;1Directs standard output and standard errors to file dirlist, while the commandLS 2>1 > DirlistStandard output is only directed to file Dirlist because standard errors are copied to standard output until standard output is redirected to file dirlist.Some filenames are specially handled by bash in redirection, as shown in the following table:/dev/fd/fdIf the FD is a valid integer, the file descriptor fd is copied./dev/stdinFile descriptor 0 is copied./dev/stdoutFile descriptor 1 is copied./dev/s
this example: http:
3,Window. Location. HostHost part of the URLReturn Value in this example: www.x2y2.com
4,Window. Location. PortURL PortIf the default port 80 is used (Update: Even if: 80 is added), Then the returned value is not the default 80, but an empty character.Returned value in this example :""
5,Window. Location. pathnameURL path (that is, the file address)Returned value in this example:/Fisker/post/0703/window.location.html
6,Win
developerProvides underlying support for communication services, directory services, and security services. The RPC-runtime function library is processing Deliberately constructed data.A condition competition error may occur during the package. Attackers can exploit this vulnerability to gain system management permissions. However, due to the condition competition vulnerabilityThis vulnerability can only cause DoS attacks.
Temporary solution:* Use a personal firewall, such as an Internet Conne
click "stop" to stop the service, select "disabled" in "Start type" and click "OK. In this way, closing the SMTP service is equivalent to closing the corresponding port.Enable PortIf you want to enable this port, you only need to select "Auto" in "Start type", click "OK", and then open the service, in "service status", click "start" to enable the port. Finally, click "OK.In addition, in the network connection properties, select the "TCP/IP protocol"
= invalid_handle_value){// The port cannot be openedCstring strerror;Strerror. Format (_ T ("unable to open % s, error no. = % d "),Lpszportname, getlasterror ());MessageBox (null, strerror, text ("error"), mb_ OK );Return false;}// Event set monitored by the specified portSetcommmask (hport, ev_rxchar );// Allocate the device Buffer Setupcomm (hport 512,512 );// Initialize the information in the buffer.Purgecomm (hport, purge_txclear | purge_rxclear );// Configure the serial
the host 59.78.139.215 communicates with any other host, but does not include packets between the host 59.78.139.21659.78. 139.215 59.78. 139.216Intercept all data sent by host 59.78.139.21559.78. 139.215Monitor all packets sent to host hostname59.78. 139.2154. Monitoring packets for a specified host and portIf you want to get the Telnet packet received or issued by the host 59.78.139.215 , use the following command at 59.78. 139.215monitoring the U
(); Httpclient.communicate ();}}3. Close socketWhen the client communicates with the server, the socket should be closed in time to release the various resources, including ports, that the socket occupies. The close () method of the socket is responsible for closing the socket. When a socket object is closed, I/O operations cannot be performed through his input stream and output stream, otherwise it will cause ioexception.To ensure that the operation to close the socket is always executed, it i
can do this by opening Control Panel first, double-clicking Administrative Tools, and then double-clicking Services. Then locate and double-click the simple Mail Transfer Protocol (SMTP) service in the Open Services window, click the Stop button to stop the service, and then select Disabled in Startup Type, and then click OK. In this way, shutting down the SMTP service is equivalent to shutting down the corresponding port.Open portIf you want to open
available RS232 ports in the system:Enumeration en = Commportidentifier.getportidentifiers ();Commportidentifier Portid;while (En.hasmoreelements ()){Portid = (commportidentifier) en.nextelement ();/* If the port type is serial, print out its port information.if (portid.getporttype () = = commportidentifier.port_serial){System.out.println (Portid.getname ());}}On my Computer The above program outputs the following results:COM1COM2The Getportidentifiers method of Commportidentifier class can fin
("/", Sayhelloname)//Set Access routingERR: = http. Listenandserve (": 9090", nil)//set the listening portIf Err!= nil {Log. Fatal ("Listenandserve:", err)}}
The above code, we build, then execute Web.exe, this time actually already in 9090 Port listening for HTTP link request.
Enter http://localhost:9090 in Browser
You can see the browser page output Hello astaxie!
You can try a different address: http://localhost:9090/?url_long=111url_long=22
This article details the usage of socket in PHP and share it for everyone's reference. The specific usage is as follows:
First, open the socket
Phpinfo () to see if the socket extension is turned on or open in php.ini.
Second, the server-side code of the wording
Copy Code code as follows:
Error_reporting (E_all);
Set_time_limit (0);
Ob_implicit_flush ();
$address = ' 127.0.0.1 ';$port = 10005;Create Portif (($sock = Socket_create
/run/redis_6379.pid.
Pidfile/var/run/redis_6379.pid
PortIf you are not ready to use the default port, you can modify it.
Port 6379
LogLevelSet the logging level.
LogLevel Notice
LogFileModify the log file path.
Logfile/var/log/redis_6379.log
DirSet Directory to/var/lib/redis/6379
dir/var/lib/redis/6379
SafetyHere are a few things you can do to improve your security.
Unix
; Automatically fill with my IPmemset (Server_addr.sin_zero, ' the ", sizeof (Server_addr.sin_zero));
Bind the newly created socket to the specified IP and portif (Bind (SOCK_FD, (struct sockaddr *) server_addr, sizeof (SERVER_ADDR)) = = 1){Perror ("Bind error!");Exit (1);}Start listening, maximum number of connections is backlogif (Listen (SOCK_FD, BACKLOG) = = 1)
{Perror ("Listen error!");Exit (1);}
printf ("Listen Port%d\n", MyPort);Monitor file De
socket to". $this->domain. "On port". $this->port. " (". $this->getlastsocketerror ($this->initfd).");}Listen on selected portif (! @socket_listen ($this->initfd, $this->maxqueue))Die ("Patserver:could Not Listen (". $this->getlastsocketerror ($this->initfd). ");$this->senddebugmessage ("listening on port". $this->port. ". Server started at '. Date (' H:i:s ', Time ());This allows the shutdown function to check whether the server are already shut dow
, note the portIf not, we enter the/etc/init.d/directory, Shell command: LS | grep postgres, find the Metasploit-postgres,shell command:./metasploit-postgres start, you can turn on the Postgres service, if you want to shut down with stop. When turned on, note the port.View the default password for the Postgres database and connect to the databaseThe user name and password are placed in the/OPT/METASPLOIT/CONFIG/DATABASE.YML profile, and Vim opens for
just added >> add jmx link, use the configured portIf we do not configure the jvm_opts parameter, then we do not have access to the Tomcat service on the remote server by using JAVAVISUALVM locally, and if you want to know the status of the remote server, you must use tools such as the CRT to connect to the server using Linux commands to see how the program is running.Monitoring Java programs on the server
Add the following parameters to the JAVA-CP
-lib-$date. Tar.gz/var/lib/mysql dbinfo.txt >/dev/null # Discard all outputs Rm-rf/tmp/dbbak/dbinfo.txt # Xiemoshalv else mkdir/tmp/dbbak ... fi#!/bin/bash# determine if Apache starts (installs Nmap:rpm-ivh http://nmap.org/dist/nmap-4.68-1.i386.rpm) port=$ (nmap-st 192.168.1.156 | grep TCP | grep http | awk ' {print $} ') # Use the Nmap command to scan the server and intercept the status of the Apache service, assigning the variable
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.